package it.patamau.bukkit.deathmatch;

import java.io.Serializable;

import org.bukkit.event.entity.EntityDamageEvent.DamageCause;

public class DMPlayerStat implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private String name; //player name
	private Integer deaths = 0; //number of time was killed
	private Integer kills = 0; //number of time has killed
	
	private volatile DamageCause damagecause; //the last damage cause
	private volatile String damager; //the last player which damaged the player
	
	public DMPlayerStat(String name){
		this.name = name;
	}
	
	public DMPlayerStat(){
		//default constructor
	}
	
	public DamageCause getDamagecause() {
		return damagecause;
	}

	public void setDamagecause(DamageCause damagecause) {
		this.damagecause = damagecause;
	}

	public String getDamager() {
		return damager;
	}

	public void setDamager(String damager) {
		this.damager = damager;
	}

	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getDeaths() {
		return deaths;
	}
	
	public void setDeaths(Integer deaths) {
		this.deaths = deaths;
	}
	
	public Integer getKills() {
		return kills;
	}
	
	public void setKills(Integer kills) {
		this.kills = kills;
	}
	
	public String toString(){
		return this.name+" "+this.kills+"/"+this.deaths;
	}
}
